@echo off
echo ========================================
echo    100%% 可以运行的Nginx配置
echo ========================================

echo.
echo 1. 停止Nginx...
taskkill /f /im nginx.exe 2>nul

echo.
echo 2. 直接替换默认页面...
copy "D:\pycharam\PycharmProjects\anr-analyzer\frontend\static\index.html" "D:\nginx\nginx-1.29.1\nginx-1.29.1\html\index.html"

echo.
echo 3. 启动Nginx...
cd /d "D:\nginx\nginx-1.29.1\nginx-1.29.1"
start nginx.exe

echo.
echo ========================================
echo    完成！现在访问: http://localhost
echo    应该能看到ANR分析工具页面
echo ========================================

timeout /t 3 /nobreak >nul
start http://localhost


